FROM liufang/alipine
LABEL maintainer="i@liufang.org.cn" \
	  version="v7.4" \
	  description="PHP编译镜像,当前编译版本为 v7.4.1"

#替换软件源为镜像
#http://mirrors.aliyun.com/alpine/v3.11/main
#http://mirrors.aliyun.com/alpine/v3.11/community
#RUN echo -e "http://mirrors.aliyun.com/alpine/v3.11/main\r\nhttp://mirrors.aliyun.com/alpine/v3.11/community\r\n" > /etc/apk/repositories
COPY php-7.4.1.tar.gz php-7.4.1.tar.gz
#安装gcc
RUN apk add gcc automake autoconf libtool make \
	g++ \
	libxml2 \
	libxml2-dev \
	curl \
	curl-dev \
	libzip \
	libzip-dev \
	sqlite \
	sqlite-dev \
## wget https://www.php.net/distributions/php-7.4.1.tar.gz && \
 && tar zxvf php-7.4.1.tar.gz && cd php-7.4.1 && ./configure --enable-fpm --without-sqlite3 && make && make install

COPY php-fpm.conf /usr/local/etc/php-fpm.conf
COPY www.conf /usr/local/etc/php-fpm.d/www.conf
EXPOSE 9000 9000/tcp
CMD ["php-fpm", "--nodaemonize"]
#ENTRYPOINT